package com.marchsoft.group.manager.security.controller;



import com.marchsoft.group.manager.common.response.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public  class  MyErrorContorller {
    @PostMapping("/error")
    public Result throwException(HttpServletRequest request) throws Exception {
        throw (Exception) request.getAttribute("exception");
    }

}